package jvlite.core;

import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import javax.servlet.ServletContextEvent;

import myJlite.entity.StaffVO;
import jvlite.authority.AbstractAuthManager;
import jvlite.mvc.annotaion.Part;
import jvlite.plugin.mybatis.MyBatisSessionMgr;

/**
 * store for global constants and variables
 * 
 * @author Administrator
 * 
 */
@Part
public abstract class JLiteContext implements Const {

	public static String errorPath = "/error.jsp";
	public static Boolean isAOP = Boolean.FALSE;
	public static Boolean isAuthority = Boolean.FALSE;
	public static Boolean isInjector = Boolean.FALSE;
	public static Boolean isGenerateTable = Boolean.FALSE;
	public static Boolean isPlugin = Boolean.FALSE;
	public static ServletContextEvent context;
	// action package for scan
	public static String actionPackage = "myJlite";
	// data source
	public static String driverClassName = "com.mysql.jdbc.Driver";
	public static String url = "jdbc:mysql://localhost:3306/jlite";
	public static String username = "root";
	public static String password = "";
	// database connect pool
	public static String initialSize = "10";
	public static String maxActive = "50";
	public static String maxIdle = "20";
	public static String minIdle = "5";
	public static String maxWait = "60000";
	public static String connectionProperties = "useUnicode=true;characterEncoding=utf8";
	public static String defaultAutoCommit = "true";
	public static String defaultReadOnly = "false";
	public static String defaultTransactionIsolation = "READ_COMMITTED";
	public static Map<String, String> allActionMap = new HashMap<String, String>();
	public static ArrayList<Class<? extends Annotation>> allAnnotationTypes = new ArrayList<Class<? extends Annotation>>();
	public static Set<Class<?>> clazzSet = new HashSet<Class<?>>();
	public static MyBatisSessionMgr myBatisSessionMgr;
	public static AbstractAuthManager authManager;
	public static StaffVO curUser;
	
}